package com.dkd.manage.service.impl;

import java.util.List;
import com.dkd.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dkd.manage.mapper.EquipmentTypeMapper;
import com.dkd.manage.domain.EquipmentType;
import com.dkd.manage.service.IEquipmentTypeService;

/**
 * 设备类型管理Service业务层处理
 * 
 * @author lengxx
 * @date 2025-03-24
 */
@Service
public class EquipmentTypeServiceImpl implements IEquipmentTypeService
{
    @Autowired
    private EquipmentTypeMapper equipmentTypeMapper;

    /**
     * 查询设备类型管理
     * 
     * @param id 设备类型管理主键
     * @return 设备类型管理
     */
    @Override
    public EquipmentType selectequipmentTypeById(Long id)
    {
        return equipmentTypeMapper.selectequipmentTypeById(id);
    }

    /**
     * 查询设备类型管理列表
     * 
     * @param equipmentType 设备类型管理
     * @return 设备类型管理
     */
    @Override
    public List<EquipmentType> selectequipmentTypeList(EquipmentType equipmentType)
    {
        return equipmentTypeMapper.selectequipmentTypeList(equipmentType);
    }

    /**
     * 新增设备类型管理
     * 
     * @param equipmentType 设备类型管理
     * @return 结果
     */
    @Override
    public int insertequipmentType(EquipmentType equipmentType)
    {
        equipmentType.setCreateTime(DateUtils.getNowDate());
        return equipmentTypeMapper.insertequipmentType(equipmentType);
    }

    /**
     * 修改设备类型管理
     * 
     * @param equipmentType 设备类型管理
     * @return 结果
     */
    @Override
    public int updateequipmentType(EquipmentType equipmentType)
    {
        equipmentType.setUpdateTime(DateUtils.getNowDate());
        return equipmentTypeMapper.updateequipmentType(equipmentType);
    }

    /**
     * 批量删除设备类型管理
     * 
     * @param ids 需要删除的设备类型管理主键
     * @return 结果
     */
    @Override
    public int deleteequipmentTypeByIds(Long[] ids)
    {
        return equipmentTypeMapper.deleteequipmentTypeByIds(ids);
    }

    /**
     * 删除设备类型管理信息
     * 
     * @param id 设备类型管理主键
     * @return 结果
     */
    @Override
    public int deleteequipmentTypeById(Long id)
    {
        return equipmentTypeMapper.deleteequipmentTypeById(id);
    }
}
